<html>

    <head>
        <meta http-equiv="Content-Language" content="en-us">
        <title>SITE Command</title>
    </head>

    <body bgcolor="#FFFFFF">
        <h1 align="center"><font face="Arial" color="#663300"><i>SITE Command</i></font></h1>

        <p><font face="Arial" size="3">SITE command is used by the server to provide services specific to the system. 
        Most of the SITE commands can be used by the <i>admin</i> only. You can get all the available SITE commands by 
        <em>SITE HELP</em>.</font></p>

        <p><font face="Arial" size="3">All the server administrative tasks can be performed by the SITE command. 
        So the administrator can monitor, control the server remotely. All the available SITE commands descriptions 
        with sample outputs are as follows:</font></p>

        <p><font face="Arial" size="3"><b>SITE HELP</b><br>
        This is the only SITE command that can be executed by non-admin user. 
        It returns all the available SITE commands.</font></p>
        <pre><font size="2">
ftp&gt; quote SITE HELP
200-
ADDIP &lt;IP&gt; : add banned IP entry
ADDUSER &lt;userName&gt; : add user
DELIP &lt;IP&gt; : delete banned IP entry
DELUSER &lt;userName&gt; : delete user
DESCUSER &lt;userName&gt; : describe user
HELP : display this message
KICK &lt;userName&gt; : close the connection
LISTIP : display all banned IPs
LISTUSER : display all user names
SETATTR &lt;userName&gt; &lt;attrName&gt; &lt;attrValue&gt; : set user attributes
WHO : display all connected users
200
ftp&gt;
    </font></pre>

    <p><font face="Arial" size="3"><b>SITE WHO</b><br>
    You can get the list of all the currently connected user by this SITE command. It returns user name, client IP, 
    login time and last access time. You can disconnect a client connection using <b>SITE KICK &lt;userName&gt;</b>. 
    If an user has logged-in multiple times, all these connections will get disconnected.</font></p>
    <pre><font size="2">
ftp&gt; quote SITE WHO
200-
admin           127.0.0.1       10/17 19:45:42  10/17 20:17:37
admin           127.0.0.1       10/17 19:46:13  10/17 20:17:24
anonymous       127.0.0.1       10/17 19:46:21  10/17 20:16:45
anonymous       127.0.0.1       10/17 19:46:42  10/17 20:02:50
ranab           127.0.0.1       10/17 20:09:39  10/17 20:09:40
200
ftp&gt; quote SITE KICK ranab
200 Command SITE okay
ftp&gt; quote SITE WHO
200-
admin           127.0.0.1       10/17 19:45:42  10/17 20:17:37
admin           127.0.0.1       10/17 19:46:13  10/17 20:18:33
anonymous       127.0.0.1       10/17 19:46:21  10/17 20:18:16
anonymous       127.0.0.1       10/17 19:46:42  10/17 20:02:50
200
ftp&gt;
    </font></pre>

    <p><font face="Arial" size="3"><b>SITE LISTIP</b><br>
    SITE LISTIP returns all the banned/allowed IPs. New entries can be added by <b>SITE ADDIP &lt;entry&gt;</b>. 
    Similarly existing entries can be removed by <b>SITE DELIP &lt;entry&gt;</b>.</font></p>
    <pre><font size="2">
ftp&gt; quote SITE LISTIP
200-
200
ftp&gt; quote SITE ADDIP 111.222.*
200 Command SITE okay
ftp&gt; quote SITE ADDIP 222.111.100.*
200 Command SITE okay
ftp&gt; quote SITE LISTIP
200-
111.222.*
222.111.100.*
200
ftp&gt; quote SITE DELIP 111.222.*
200 Command SITE okay
ftp&gt; quote SITE LISTIP
200-
222.111.100.*
200
ftp&gt;
    </font></pre>

    <p><font face="Arial" size="3"><b>SITE LISTUSER</b><br>
    This command returns all the user names in the user store. By executing <b>SITE DESCUSER &lt;userName&gt;</b> we 
    can get the user parameters (except password). Existing users can be removed by <b>SITE DELUSER &lt;userName&gt;</b>.</font></p>
    <pre><font size="2">
ftp&gt; quote SITE LISTUSER
200-
admin
anonymous
ranab
user1
200
ftp&gt; quote SITE DESCUSER user1
200-
uid : user1
userpassword : ******
homedirectory : C:/
writepermission : true
enableflag : true
idletime : 1800
uploadrate : 0
downloadrate : 0
200
ftp&gt; quote SITE DELUSER user1
200 Command SITE okay
ftp&gt; quote SITE LISTUSER
200-
admin
anonymous
ranab
200
ftp&gt;
    </font></pre>

    <p align="left"><font face="Arial" size="3"><b>SITE ADDUSER &lt;userName&gt;</b><br>
    New users can be added using this command. The newly created user will have default parameters. 
    In case of an existing user, this command will be ignored. The attributes are :<br>
    <u>userpassword</u> (default - empty string : &quot;&quot;)<br>
    <u>homedirectory</u> (default - configured default root)<br>
    <u>writepermission</u> (default - false)<br>
    <u>enableflag</u> (default - false)<br>
    <u>idletime</u> (default - configured default idle time)<br>
    <u>uploadrate</u> (default - no limit)<br>
    <u>downloadrate</u> (default - no limit)<br>
    We can change any user attribute by <b>SETATTR &lt;userName&gt; &lt;attrName&gt; &lt;attrValue&gt;</b> command.</font></p>
    <pre><font size="2">
ftp&gt; quote SITE LISTUSER
200-
admin
anonymous
ranab
200
ftp&gt; quote SITE ADDUSER user2
200 Command SITE okay
ftp&gt; quote SITE DESCUSER user2
200-
uid : user2
userpassword : ******
homedirectory : C:/
writepermission : false
enableflag : false
idletime : 300
uploadrate : 0
downloadrate : 0
200
ftp&gt; quote SITE SETATTR user2 userpassword userpassword
200 Command SITE okay
ftp&gt; quote SITE SETATTR user2 homedirectory C:/myCode
200 Command SITE okay
ftp&gt; quote SITE SETATTR user2 enableflag true
200 Command SITE okay
ftp&gt; quote SITE SETATTR user2 uploadrate 5600
200 Command SITE okay
ftp&gt; quote SITE DESCUSER user2
200-
uid : user2
userpassword : ******
homedirectory : C:/myCode/
writepermission : false
enableflag : true
idletime : 300
uploadrate : 5600
downloadrate : 0
200
ftp&gt; quote SITE LISTUSER
200-
admin
anonymous
ranab
user2
200
ftp&gt;
    </font></pre>

</body>
</html>
